#version 120

varying vec4 texcoord;
varying vec3 lightPosition;

uniform vec3 sunPosition;
uniform mat4 gbufferModelViewInverse;

void main() {
    gl_Position = ftransform();
    texcoord = gl_TextureMatrix[0] * gl_MultiTexCoord0;
    lightPosition = (vec4(sunPosition, 1.0) * gbufferModelViewInverse).xyz;
}